package org.framework.core.validate.support.param;

import javax.servlet.http.HttpServletRequest;

import org.framework.core.error.support.Errors;
import org.framework.core.util.StringUtil;
import org.framework.core.validate.exception.ParamFormatException;
import org.framework.core.validate.exception.ValidationException;
import org.framework.define.bean.result.Errcode;

public class IntegerParam extends NumberParam {
	
	@Override
	protected Errcode validateValue(HttpServletRequest request, String paramString) throws ValidationException {
		if(!StringUtil.isInteger(paramString))
			throw new ParamFormatException(this);
		return Errors.OK;
	}
}
